package com.cxs.shopstore.service.impl;

import com.cxs.shopstore.models.Car;
import com.cxs.shopstore.mapper.CarMapper;
import com.cxs.shopstore.service.CarService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cxs.shopstore.utils.ImgUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author cxs
 * @since 2021-05-06
 */
@Service
public class CarServiceImple extends ServiceImpl<CarMapper, Car> implements CarService {
    @Autowired
    private CarMapper carMapper;
    @Autowired
    private ImgUtils imgUtils;
    @Override
    public List<Car> getCarList(String userId) {
        return imgUtils.imgToBase64String(carMapper.getCarGoodList(userId));
    }
}
